#ifndef XNODE
#define XNODE
#include "../XModEngine/XComponent.h"
#include "../XModEngine/XObject.h"
#include "../XModEngine/Matrix.h"
#include "COMInclude.h"
class XC_ENTRY  XNode : public XObject, IXMoveble, IXRenderble{
protected:
	string m_name;
	bool m_visible,m_update;
	XNode* m_parent;
	vector<XNode*> m_children;
	Vector3 m_posParent;
	Matrix4 m_rotParent;
	Matrix4 m_finalMatrix;
	float m_scale;
public:
	XNode();
	~XNode();
	virtual void SetVisible(bool visible);
	virtual void AddChild(XNode* child);
	virtual void RemoveChild(XNode* child);
	virtual void RemoveAllChild();
	virtual XNode* GetChild(int index);
	virtual int GetChildIndex(XNode* child);
	virtual XNode* GetParent();
	virtual void SetParent(XNode* parent);
	virtual Matrix4 GetTransform();
	virtual Vector3 GetPosition();
	virtual void SetScale(float scale);
	virtual float GetScale();
	virtual bool IsVisible();
	virtual void SetOffestToParent(Vector3 pos);
	virtual Vector3 GetOffestToParent();
	virtual void SetRotationToParent(Matrix4 rot);
	virtual Matrix4 GetRotationToParent();
	virtual void UpdateSceneGraph(bool compulsive);
	virtual void Update() = 0;
	virtual void Render() = 0;

};
#endif